package org.myself.meeting.service;

import org.myself.meeting.mapper.NewMessageMapper;
import org.myself.meeting.model.NewMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class NewMessageService {

    @Autowired
    NewMessageMapper newMessageMapper;


    public  List<NewMessage> getNewMessage(Integer page, Integer pagesize) {
        page = (page-1)*pagesize;
        List<NewMessage> lnew = newMessageMapper.getNewMessage(page,pagesize);
        return lnew;
    }

    public long getCountAll() {
        return newMessageMapper.getCountAll();
    }
}

